<template>
  <div class="mains">
    <div class="first">
      <div class="titles">地块信息</div>
      <div class="amountmain">
        <div class="detail-mian">
          <div class="detail">
            <div class="img"></div>
            <div class="text">
              <div><span>地块编号</span> <span>1020390</span></div>
              <div><span>面积</span> <span>200亩</span></div>
              <div><span>地类</span> <span>水田</span></div>
              <div><span>建设信息</span> <span>查看电子档案</span></div>
              <div><span>经营主体</span> <span>供销社</span></div>
            </div>
          </div>
          <div class="sousuo">
            <input type="text" placeholder="输入地块编号">
            <div class="btn">查找</div>
          </div>
        </div>
      </div>
    </div>
    <div class="two">
      <div class="titles">种植作物情况</div>
      <div class="switchs">
        <div class="sli">小麦</div>
        <div class="sli">玉米</div>
        <div class="sli">土豆</div>
        <div class="sli">大豆</div>
        <div class="sli">蔬菜</div>
      </div>
      <div class="echarts">
        <echart :options="option1"/>
      </div>
    </div>
    <div class="three">
      <div class="titles">量产情况 </div>
      
      <div class="echarts">
        <echart :options="option2"/>
      </div>
    </div>
  </div>
</template>

<script>
import Echart from '@/components/echart/Echart.vue';
import {echarts1,echarts2} from '../echarts/echart'

export default {
  components: { Echart },
  data() {
    return {
      option1: undefined,
      option2: undefined
    };
  },

  created() {
    this.setEcharts();
  },
  mounted() {
    
  },

  methods: {
    setEcharts() {
      this.option1 = echarts1();
      this.option2 = echarts2();
    }
  },
};
</script>

<style lang="scss" scoped>
.mains {
  margin-top: 117px;
  height: calc(100% - 117px - 30px);
  margin-left: 20px;
  .titles {
    width: 100%;
    height: 36px;
    line-height: 36px;
    font-size: 24px;
    font-family: ysbt;
    background: url(~assets/images/title_bg.png) no-repeat;
    background-size: 100% 100%;
    padding-left: 15px;
    text-shadow: 0 0 10px #fff,0 0 20px #1862b4,0 0 30px #1862b4;
  }
  .first {
    .amountmain {
      width: 100%;
      padding: 10px 0;
      .detail-mian {
        height: 236px;
        background: url(~assets/images/vtourlfbg.png) no-repeat;
        background-size: 100% 100%;
        padding: 20px 15px;
        .detail {
          display: flex;
          .img {
            width: 40%;
            background-color: #2875a2;
          }
          .text {
            flex: 1;
            margin-left: 15px;
            div {
              display: flex;
              justify-content: space-between;
              color: #B5C1E4;
              font-size: 14px;
              line-height: 30px;
            }
          }
        }
        .sousuo {
          background: url(~assets/images/soubg.png) no-repeat;
          background-size: 100% 100%;
          height: 44px;
          line-height: 44px;
          margin-top: 10px;
          display: flex;
          input {
            width: 80%;
            height: 100%;
            background-color: transparent;
            border: 0;
            padding-left: 15px;
            color: #fff;
          }
          .btn {
            margin-left: 10px;
            font-size: 14px;
            color: #21A7F6;
            background: url(~assets/images/sousuo.png) no-repeat left center;
            background-size: 14px;
            padding-left: 20px;
            cursor: pointer;
          }
        }
      }
    }
  }
  .two {
    height: 35%;
    .switchs {
      display: flex;
      justify-content: space-around;
      .sli {
        width: 60px;
        height: 48px;
        font-size: 17px;
        text-align: center;
        padding-top: 10px;
        &:nth-child(1) {
          background: url(~assets/images/tlilbg1.png) no-repeat bottom;
          background-size: 60px 48px;
        }
        &:nth-child(2) {
          background: url(~assets/images/tlilbg2.png) no-repeat bottom;
          background-size: 60px 32px;
        }
        &:nth-child(3) {
          background: url(~assets/images/tlilbg3.png) no-repeat bottom;
          background-size: 60px 32px;
        }
        &:nth-child(4) {
          background: url(~assets/images/tlilbg4.png) no-repeat bottom;
          background-size: 60px 32px;
        }
        &:nth-child(5) {
          background: url(~assets/images/tlilbg5.png) no-repeat bottom;
          background-size: 60px 32px;
        }
      }
    }
    .echarts {
      margin-top: 10px;
      height: calc(100% - 36px - 48px - 10px);
    }
  }
  .three {
    height: calc(100% - 35% - 291px);
    
    .echarts {
      height: calc(100% - 36px);
    }
  }
}
</style>